<?php
namespace ImiApp\Module\Member\Service\Base;

use Imi\Model\Model;
use Imi\Model\Annotation\DDL;
use Imi\Model\Annotation\Table;
use Imi\Model\Annotation\Column;
use Imi\Model\Annotation\Entity;

/**
 * 广告管理 基类
 * @Entity
 * @Table(name="sc_adv", id={"id"})
 * @DDL("CREATE TABLE `sc_adv` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `class_id` int(10) DEFAULT NULL COMMENT '课程id',
  `image` varchar(255) DEFAULT NULL COMMENT '广告图',
  `start_time` int(10) DEFAULT NULL COMMENT '开始时间',
  `end_time` int(10) DEFAULT NULL COMMENT '结束时间',
  `weigh` int(10) DEFAULT NULL COMMENT '权重',
  `status_switch` tinyint(1) DEFAULT '1' COMMENT '状态:0=停止,1=正常',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='广告管理'")
 * @property int $id 
 * @property int $classId 课程id
 * @property string $image 广告图
 * @property int $startTime 开始时间
 * @property int $endTime 结束时间
 * @property int $weigh 权重
 * @property int $statusSwitch 状态:0=停止,1=正常
 */
abstract class ScAdvBase extends Model
{
    /**
     * id
     * @Column(name="id", type="int", length=10, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=0, isAutoIncrement=true)
     * @var int
     */
    protected $id;

    /**
     * 获取 id
     *
     * @return int
     */ 
    public function getId()
    {
        return $this->id;
    }

    /**
     * 赋值 id
     * @param int $id id
     * @return static
     */ 
    public function setId($id)
    {
        $this->id = $id;
        return $this;
    }

    /**
     * 课程id
     * class_id
     * @Column(name="class_id", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $classId;

    /**
     * 获取 classId - 课程id
     *
     * @return int
     */ 
    public function getClassId()
    {
        return $this->classId;
    }

    /**
     * 赋值 classId - 课程id
     * @param int $classId class_id
     * @return static
     */ 
    public function setClassId($classId)
    {
        $this->classId = $classId;
        return $this;
    }

    /**
     * 广告图
     * image
     * @Column(name="image", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $image;

    /**
     * 获取 image - 广告图
     *
     * @return string
     */ 
    public function getImage()
    {
        return $this->image;
    }

    /**
     * 赋值 image - 广告图
     * @param string $image image
     * @return static
     */ 
    public function setImage($image)
    {
        $this->image = $image;
        return $this;
    }

    /**
     * 开始时间
     * start_time
     * @Column(name="start_time", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $startTime;

    /**
     * 获取 startTime - 开始时间
     *
     * @return int
     */ 
    public function getStartTime()
    {
        return $this->startTime;
    }

    /**
     * 赋值 startTime - 开始时间
     * @param int $startTime start_time
     * @return static
     */ 
    public function setStartTime($startTime)
    {
        $this->startTime = $startTime;
        return $this;
    }

    /**
     * 结束时间
     * end_time
     * @Column(name="end_time", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $endTime;

    /**
     * 获取 endTime - 结束时间
     *
     * @return int
     */ 
    public function getEndTime()
    {
        return $this->endTime;
    }

    /**
     * 赋值 endTime - 结束时间
     * @param int $endTime end_time
     * @return static
     */ 
    public function setEndTime($endTime)
    {
        $this->endTime = $endTime;
        return $this;
    }

    /**
     * 权重
     * weigh
     * @Column(name="weigh", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $weigh;

    /**
     * 获取 weigh - 权重
     *
     * @return int
     */ 
    public function getWeigh()
    {
        return $this->weigh;
    }

    /**
     * 赋值 weigh - 权重
     * @param int $weigh weigh
     * @return static
     */ 
    public function setWeigh($weigh)
    {
        $this->weigh = $weigh;
        return $this;
    }

    /**
     * 状态:0=停止,1=正常
     * status_switch
     * @Column(name="status_switch", type="tinyint", length=1, accuracy=0, nullable=true, default="1", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $statusSwitch;

    /**
     * 获取 statusSwitch - 状态:0=停止,1=正常
     *
     * @return int
     */ 
    public function getStatusSwitch()
    {
        return $this->statusSwitch;
    }

    /**
     * 赋值 statusSwitch - 状态:0=停止,1=正常
     * @param int $statusSwitch status_switch
     * @return static
     */ 
    public function setStatusSwitch($statusSwitch)
    {
        $this->statusSwitch = $statusSwitch;
        return $this;
    }

}
